Machine learning to understand risks for severe COVID-19 outcomes: a retrospective cohort study of immune-mediated inflammatory diseases, immunomodulatory medications, and comorbidities in a large US health-care system

Summary Background In the context of immune-mediated inflammatory diseases (IMIDs), COVID-19 outcomes are incompletely understood and vary considerably depending on the patient population studied. We aimed to analyse severe COVID-19 outcomes and to investigate the effects of the pandemic time period and the risks associated with individual IMIDs, classes of immunomodulatory medications (IMMs), chronic comorbidities, and COVID-19 vaccination status. Methods In this retrospective cohort study, clinical data were derived from the electronic health records of an integrated health-care system serving patients in 51 hospitals and 1085 clinics across seven US states (Providence St Joseph Health). Data were observed for patients (no age restriction) with one or more IMID and for unmatched controls without IMIDs. COVID-19 was identified with a positive nucleic acid amplification test result for SARS-CoV-2. Two timeframes were analysed: March 1, 2020–Dec 25, 2021 (pre-omicron period), and Dec 26, 2021–Aug 30, 2022 (omicron-predominant period). Primary outcomes were hospitalisation, mechanical ventilation, and mortality in patients with COVID-19. Factors, including IMID diagnoses, comorbidities, long-term use of IMMs, and COVID-19 vaccination status, were analysed with multivariable logistic regression (LR) and extreme gradient boosting (XGB). Findings Of 2 167 656 patients tested for SARS-CoV-2, 290 855 (13·4%) had confirmed COVID-19: 15 397 (5·3%) patients with IMIDs and 275 458 (94·7%) without IMIDs. In the pre-omicron period, 169 993 (11·2%) of 1 517 295 people who were tested for COVID-19 tested positive, of whom 23 330 (13·7%) were hospitalised, 1072 (0·6%) received mechanical ventilation, and 5294 (3·1%) died. Compared with controls, patients with IMIDs and COVID-19 had higher rates of hospitalisation (1176 [14·6%] vs 22 154 [13·7%]; p=0·024) and mortality (314 [3·9%] vs 4980 [3·1%]; p<0·0001). In the omicron-predominant period, 120 862 (18·6%) of 650 361 patients tested positive for COVID-19, of whom 14 504 (12·0%) were hospitalised, 567 (0·5%) received mechanical ventilation, and 2001 (1·7%) died. Compared with controls, patients with IMIDs and COVID-19 (7327 [17·3%] of 42 249) had higher rates of hospitalisation (13 422 [11·8%] vs 1082 [14·8%]; p<0·0001) and mortality (1814 [1·6%] vs 187 [2·6%]; p<0·0001). Age was a risk factor for worse outcomes (adjusted odds ratio [OR] from 2·1 [95% CI 2·0–2·1]; p<0·0001 to 3·0 [2·9–3·0]; p<0·0001), whereas COVID-19 vaccination (from 0·082 [0·080–0·085]; p<0·0001 to 0·52 [0·50–0·53]; p<0·0001) and booster vaccination (from 2·1 [2·0–2·2]; p<0·0001 to 3·0 [2·9–3·0]; p<0·0001) status were associated with better outcomes. Seven chronic comorbidities were significant risk factors during both time periods for all three outcomes: atrial fibrillation, coronary artery disease, heart failure, chronic kidney disease, chronic obstructive pulmonary disease, chronic liver disease, and cancer. Two IMIDs, asthma (adjusted OR from 0·33 [0·32–0·34]; p<0·0001 to 0·49 [0·48–0·51]; p<0·0001) and psoriasis (from 0·52 [0·48–0·56] to 0·80 [0·74–0·87]; p<0·0001), were associated with a reduced risk of severe outcomes. IMID diagnoses did not appear to be significant risk factors themselves, but results were limited by small sample size, and vasculitis had high feature importance in LR. IMMs did not appear to be significant, but less frequently used IMMs were limited by sample size. XGB outperformed LR, with the area under the receiver operating characteristic curve for models across different time periods and outcomes ranging from 0·77 to 0·92. Interpretation Our results suggest that age, chronic comorbidities, and not being fully vaccinated might be greater risk factors for severe COVID-19 outcomes in patients with IMIDs than the use of IMMs or the IMIDs themselves. Overall, there is a need to take age and comorbidities into consideration when developing COVID-19 guidelines for patients with IMIDs. Further research is needed for specific IMIDs (including IMID severity at the time of SARS-CoV-2 infection) and IMMs (considering dosage and timing before a patient’s first COVID-19 infection).

Interpretation-Our results suggest that age, chronic comorbidities, and not being fully vaccinated might be greater risk factors for severe COVID-19 outcomes in patients with IMIDs than the use of IMMs or the IMIDs themselves.Overall, there is a need to take age and comorbidities into consideration when developing COVID-19 guidelines for patients with IMIDs.Further research is needed for specific IMIDs (including IMID severity at the time of SARS-CoV-2 infection) and IMMs (considering dosage and timing before a patient's first COVID-19 infection).

Introduction
COVID-19 remains a challenge worldwide, with more than 7•0 million reported deaths from the disease as of Feb 28, 2024. 1 Given the variability in the course and outcomes of COVID-19 and its relationship with the immunological system, understanding outcomes in patients with immune-mediated inflammatory diseases (IMIDs) is essential.
IMIDs are a set of clinically diverse conditions characterised by immune dysregulation, chronic inflammation, and potential organ damage.IMIDs include autoimmune diseases, such as rheumatoid arthritis and multiple sclerosis, as well as inflammatory conditions, including allergic asthma.3][4][5] This patient population has an increased rate of severe COVID-19 outcomes; however, reasons why remain unclear.Potential reasons include immune dysregulation, the use of immunomodulatory medications (IMMs), and associated chronic comorbidities.Furthermore, comorbidities associated with severe COVID-19 outcomes, including heart disease and diabetes, are higher among patients with IMIDs than in the general population. 6MMs for IMIDs could theoretically foster viral replication, which might not only be detrimental in the early stages of COVID-19, but also reduce the systemic inflammatory response syndrome associated with organ damage, morbidity, and mortality. 7Additionally, patients can have multiple IMIDs or be taking multiple IMMs.Furthermore, allergic asthma has been shown to be associated with a reduced susceptibility to severe COVID-19 outcomes, leading to new insights on the intrinsic factors modulating intracellular viral load and and cell-to-cell transmission. 5alth outcomes must also be considered in the context of changes over the course of the pandemic, including SARS-CoV-2 variants, increased access to COVID-19 vaccination, and changes in the standard of care for COVID-19 treatment.][10] However, the risks associated with the IMIDs themselves are less understood.Two large cohort studies compared adult patients with and without IMIDs and found that mortality from COVID-19 was higher among those with IMIDs. 9,11Similarly, some studies have indicated an association between the use of IMMs and an increased risk of severe COVID-19 outcomes, 12 although others have not. 7,13evious studies analysing IMIDS, IMMs, and comorbidities in cohorts of patients with COVID-19 9,11,[14][15][16] did not report SARS-CoV-2 omicron (B.1.1.529,BA.1.1,BA.2, BA.2.12.1, BA5) variants or COVID-19 vaccination status, and were conducted in cohorts of fewer than 1000 patients. 17A 2023 study that used data from the National COVID Cohort Collaborative, which spans the period in the pandemic both before and after the emergence of the omicron variant, showed that patients with a previous IMID or previous exposure to IMMs had an increased risk of life-threatening outcomes from COVID-19. 18However, the study design grouped different IMIDs together, making it difficult to decipher the role of individual IMIDs in the outcomes of patients with COVID-19.
Patients with IMIDs (no age restriction) were identified on the basis of their medical history, and all unmatched controls of patients who tested positive for COVID-19 and did not have an IMID were selected from the same database.Data were observed for patients with a valid nucleic acid amplification test for SARS-CoV-2.To ensure information on IMIDs, medications, and comorbidities was known before a patient's first COVID-19 infection, patients were included if they had at least one encounter at PSJH at least 2 weeks before their first COVID-19 test.This observational study followed STROBE guidelines (appendix pp 23-27).All procedures were reviewed and approved by the Institutional Review Board at PSJH through expedited review (STUDY2021000592).Patient consent was waived because disclosure of protected health information for the study was determined to involve no more than a minimal risk to the privacy of individuals.

Procedures
The index date was considered to be the date of a valid COVID-19 test (infection date or first negative test).For patients with COVID-19, the index date was set to the date of their first positive test; for those without COVID-19, the index date was set to the date of their first negative test.Patients with severe COVID-19 outcomes (ie, hospitalisation, mechanical ventilation, or death) were identified if they were hospitalised (new admission) within the window of 3 days before 14 days of the index date; or received mechanical ventilation or died within 30 days of the index date (figure 1).Patient use of IMMs was observed for 3 months leading up to the index date to include medications that were administered periodically and had a multiple-month effect on the immune system (figure 1).IMMs were identified by RxNorm medication order codes (appendix pp 20-21).To be able to establish the effect of the use of IMMs at the time of SARS-CoV-2 infection, we selected a subset of patients who had at least one encounter with PSJH before the index date.
Comorbidities and IMIDs were identified by diagnosis codes by use of SNOMED-CT (version obtained on June 27, 2022; appendix pp 18-20).The active status of patient comorbidities and IMIDs was decided based on the index date.COVID-19 vaccination status was decided before the index date.For patients with a COVID-19 vaccine from either Moderna or Pfizer, we counted two administered doses as fully vaccinated and more than two doses as boosted.For patients with a COVID-19 vaccine from Janssen, we counted one administered dose as fully vaccinated and more than one dose as boosted.All vaccination information was obtained from state records and limited to the seven states in our study.If patients only came for a COVID-19 test during the pandemic they would not necessarily have a history taken and any comorbidities, vaccination status, and previous use of IMMs would be recorded as unknown.
Primary outcomes were the combined endpoint of hospitalisation, mechanical ventilation, and death; the combined endpoint of mechanical ventilation and death; and death among patients with COVID-19.Hospitalisation is defined within the window of 3 days before the index date to 14 days after the index date.Mechanical ventilation and death are defined as the window within 30 days after the index date.We assessed differences in the rates of outcomes using Fisher's exact test.

Statistical analysis
To evaluate which variables were most predictive of severe COVID-19 outcomes, we trained supervised machine learning models on 62 features of two cohorts of patients testing positive for SARS-CoV-2.Variables were patient demographics, COVID-19 vaccination and booster status, active comorbidities, diagnoses of IMIDs, and use of IMMs.
Continuous variables, age, and BMI were normalised by applying min-max transformation.Missing data were addressed by use of the median value to impute missing BMI values and assuming the absence of active comorbidities, IMIDs, use of IMMs, and vaccination when such data were not reported as active in structured EHR data.
Two alternate analyses were conducted to analyse anti-SARS-CoV-2 neutralising monoclonal antibodies: one with an additional binary variable for the administration of antibodies within 10 days of COVID-19 test results, and one excluding patients who received these antibodies.An additional analysis was also conducted with nirmatrelvirritonavir.
We selected two machine learning methods to assess the relative importance of IMIDs, IMMs, and comorbidities as risk factors for classifying severe COVID-19 outcomes: traditional logistic regression (LR), for ease of interpretability; and extreme gradient boosted decision tree (XGB), which is an efficient implementation of the regularised gradient boosted decision tree model that can learn non-linear relationships from high-dimensional datasets and achieve good performance without cost-prohibitive computing requirements.Three additional modelling approaches were assessed to test the assumption that XGB would have the highest performance: adaptive boosting, the k-nearest neighbour algorithm, and support vector machine (appendix p 2).Models were generated with the Python package Scikit-Learn (version 1.1.1)and XGB (version 1.6.1).Factors with fewer than ten observations were excluded from the LR model and XGB hyperparameters were tuned with the sklearn.model_selection.RandomizedSearchCV function (appendix p 11) using ten-fold cross-validation.Models were trained on 90% of the data with an over-sampling method for the LR model and an over-weight method (controlled by the scale_pos_weight parameter; appendix p 11) on minority classes to address class imbalance in training data, with 10% of the data held out for independent performance testing of the final models.Performance was evaluated on the test set for the area under the receiver operating characteristic curve, calculated with the function metrics.roc_auc_scorefrom the Python package Scikit-Learn (version 1.1.1),with the parameter average defined as weighted.Models were also evaluated by plotting the log-transformed adjusted odds ratio (OR) for each feature.
Feature importance and Shapley Additive Explanations (SHAP) were applied to understand each variable's marginal contribution by use of the Python libraries Scikit-Learn and its influence on model prediction by use of SHAP (version 0.37.0). 19Variable independence was assessed with the variance inflation factor method.A value equal to one indicates no correlation; a value greater than 5•00 is considered to be an indicator that a feature is highly correlated with other features and needs additional feature engineering.The Benjamini-Yekutieli multiple hypothesis correction was applied to p values by use of the Python statsmodel package (version 0.12.2) and both uncorrected and corrected values were reported.A p value of less than 0•05 was considered to be statistically significant in this study after the hypothesis correction was applied.
Data processing and machine learning models were conducted on Microsoft Azure with Databricks 9.1 LTS, which includes Apache Spark 3.1.2.All analysis codes were implemented and performed in Python (version 3.8.10),except for the figures, which were plotted in R (version 4.1.1).

Role of the funding source
The funders of the study had no role in study design, data collection, data analysis, data interpretation, or writing of the report.1).In the omicron-predominant period, both patients tested for COVID-19 and those with a positive test result had higher rates of comorbidities and a higher rate of vaccination than did those in the pre-omicron period (table 1).
XGB area under the receiver operating characteristic curve for the classification of all health outcomes in both time periods (range 0•77-0•92) outperformed LR (0•70-0•84).On average, XGB had 7•5% better classification performance on the hold out test set than LR, across all three outcomes and both time periods (appendix p 2).The majority of results, age, chronic cormorbidities, and COVID-19 vaccination and booster status from the SHAP analysis on the XGB model showed similar associations and relative feature importance seen in LR (figures 4, 5; appendix pp 4-6).As with the LR model, results classified improved outcomes for patients with asthma, spondyloarthritis, and psoriasis (with the exception that psoriasis classified worse outcomes for death in the omicron-predominant time period; figures 4, 5; appendix pp 4-6).Furthermore, XGB and SHAP showed that opioid dependence was predictive of all severe outcomes in both time periods, and rheumatoid arthritis, multiple sclerosis, and vasculitis were predictive of all three severe outcomes in the omicron-predominant period (figures 4, 5; appendix pp 4-6).Long-term use of systemic glucocorticoids showed mixed results for hospitalisation, but was predictive of mechanical ventilation in the omicron-predominant period and of death in both time periods (figures 4, 5; appendix pp 4-6).The results of the analyses on anti-SARS-CoV-2 neutralising monoclonal antibodies are provided in the appendix (pp 8-10).The results of the analysis on nirmatrelvir-ritonavir are provided in the appendix (pp 10-11).

Discussion
In this large retrospective cohort study, we showed that patients with IMIDs had reduced rates of COVID-19 but increased rates of severe COVID-19 outcomes during both the pre-omicron and omicron-predominant periods of the pandemic.Having a specific IMID diagnosis was less predictive of severe COVID-19 outcomes than was age, whereas vaccination and booster status were protective.Rheumatoid arthritis, vasculitis, and multiple sclerosis had some predictive value for all three severe outcomes (hospitalisation, mechanical ventilation, and death) during the omicron-predominant period.
Asthma was associated with a reduced risk of all three outcomes, relative to the population overall, supporting previous research suggesting it might have some protective effect. 5nterestingly, psoriasis also showed a reduced risk of all three outcomes in both time periods, and spondyloarthritis was associated with a reduced risk in the pre-omicron period.These findings are similar to previous findings of spondyloarthritis reported by Raiker and colleagues. 20By contrast, Rosenbaum and colleagues 21 reported a small increased risk of developing COVID-19 in patients with spondyloarthritis in the pre-omicron period, although this risk was not consistently shown.[24] The most important factors for the combined endpoint of hospitalisation, mechanical ventilation, or death were age, diabetes, chronic kidney disease, COPD, stroke, atrial fibrillation, liver disease, and opioid dependence.The strongest risk factors for mortality were age, pre-existent heart failure, chronic kidney disease, atrial fibrillation, COPD, stroke, and liver disease.BMI above 30 kg/m 2 has been associated with worse outcomes; 8 however, SHAP results on gradient boosting show mixed results.This observation could suggest that risks can come from having underweight or obesity, or might reflect that the predictive importance of BMI differs between younger (aged <50 years) and older (aged ≥50 years) patients. 25Our results support previously reported studies on the risks of comorbidities and benefits of COVID-19 vaccination in the pre-omicron period. 10,26,27Additionally, we show that these associations continued into the omicron-predominant period, and that booster vaccination is also predictive of improved outcomes.
A UK nationwide cohort study on the OpenSAFELY platform showed that patients with autoimmune diseases, such as rheumatoid arthritis, systemic lupus erythematosus, and psoriasis, who tested positive for COVID-19 in the pre-omicron period had an increased risk of death, compared with those without autoimmune disease. 28In some analyses, we observed an increased risk of severe COVID-19 outcomes in patients with rheumatoid arthritis; however, we found improved outcomes for patients with psoriasis in both pandemic periods.Of note, Piaserico and colleagues 29 evaluated the quality of previous studies related to outcomes of COVID-19 in patients with psoriatic arthritis and psoriasis treated with IMMs, and found a risk of bias.
Overall, our results support previously noted associations between specific IMIDs and outcomes from the pre-omicron period of the pandemic, 6,27,30 provide new results for the omicron-predominant period, and suggest priorities for further investigation into the increased risks observed in patients with rheumatoid arthritis and multiple sclerosis, and the reduced risks (and potential protective benefits) associated with psoriasis and spondyloarthritis.Certain IMMs were previously reported to be associated with worse outcomes. 26,27,31,32Long-term use of glucocorticoids only showed an adjusted OR of 1•02 (95% CI 0•98-1•06) for death during the omicron-predominant period in results from the LR model, but showed predictive value for an increased risk of mortality in results from the XGB model for both pandemic periods.This finding supports previous reports that long-term use of systemic glucocorticoids could be implicated in adverse outcomes for some patients with IMIDs in the pre-omicron period. 10,14,32,33However, further research is needed on IMID severity at the time of COVID-19, given that disease flares might be a confounding factor affecting both steroid treatment and COVID-19 outcomes.Unlike data from prospective IMID studies, real world EHR data rarely includes structured information on IMID severity.Severity is usually mentioned only in free text notes, in heterogeneous ways, and often with minimal detail.Long-term use of other IMMs was not clearly predictive of worse outcomes.However, the analysis of less frequently used IMMs was limited by the sample size and requires further study.For example, the number of patients on anti-CD20 who tested positive for COVID-19 was low (only 12 patients in the pre-omicron period and 16 in the omicron-predominant period).
The results of our study suggest that, for patients with IMIDs, age, comorbidities, and not being fully vaccinated are more important predictive factors of severe COVID-19 outcomes than long-term use of IMMs.However, care should be taken in interpreting population-wide results.Correcting for a false discovery rate with multiple hypothesis testing reduces the risk of reporting a spurious signal, but increases the risk of overlooking factors that might be important for a subset of patients.For example, other large population studies have noted an increased risk of severe COVID-19 outcomes with long-term used of rituximab, an anti-CD20 IMM. 27,31,34e strengths of our study include a large population sample size, a multivariable analysis with a focus on immune-related risk factors, and the application of two complementary modelling approaches.We also investigated the full pandemic time period, comparing results from the early phase with those from the omicron-predominant period to provide insight into whether risk factors have changed since the emergence of the omicron variant.
Limitations of this study include a scarcity of information on: IMID disease severity and activity; the severity of non-IMID comorbidities; patients with COVID-19 who were not tested at PSJH; several aspects of SARS-CoV-2 immunity, including infection-induced immunity, diminishing effects from immunisation over time, and differences in immunity to different variants; sequencing data on actual variants; the intensity or dosage of IMMs; and the rate of IMID underdiagnoses or billing code errors.There was also no distinction between medication dosing and differences in total timing and duration of medications during the 3 months leading up to SARS-CoV-2 infection, which is of particular importance for deciphering the role of systemic glucocorticoids in COVID-19 outcomes.Differences in standard of care treatment for COVID-19 were partially accounted for by having two time periods; however, the analysis did not include COVID-19 treatment medications at the per-patient level (other than the additional analysis for anti-SARS-CoV-2 neutralising monoclonal antibodies), and patients with IMIDs might have been treated differently due to clinician concern for an increased risk of severe COVID-19 outcomes.Additionally, particularly in the omicron-predominant period, at-home rapid tests became more readily available, leading to a lower reported rate of severe outcomes in individuals testing positive for COVID-19 than the rates reported in this study.
Although variance inflation factors were considered sufficiently low (<5•00), age had a value of 3•58 in the omicron-predominant period, suggesting opportunities for future research into age-stratified models. 29Furthermore, we might have missed other potentially confounding factors, such as behavioural choices for patients with immune-related conditions and medications, other socioeconomic exposures, and delays in access to care.In addition, some sample bias might have been introduced when only selecting patients who had previously received care at PSJH.Although this inclusion criterion was needed to establish the longterm use of IMMs, it might have excluded patients who had barriers to accessing care and only sought COVID-19 treatment if they were extremely ill.
In this Article, we analysed 2 167 656 patients tested for COVID-19 from a large US healthcare system database.For patients with a positive COVID-19 test result, we developed predictive models for severe COVID-19 outcomes (hospitalisation, mechanical ventilation, and death) on 15 397 patients with IMIDs and 275 458 unmatched controls.We examined two separate time periods of the pandemic: the pre-omicron period and the omicronpredominant period.Patients with IMIDs had higher rates of hospitalisation and mortality than did patients with COVID-19 without IMIDs.Using multivariable LR and XGB models, we showed that age and chronic comorbidities were risk factors for severe COVID-19 outcomes, whereas vaccination and boosters were associated with a reduced risk.However, apart from rheumatoid arthritis and multiple sclerosis, the specific IMIDs themselves did not show an association with worse outcomes.Interestingly, spondyloarthritis and psoriasis were associated with improved outcomes, which suggests that, like asthma, 8 these IMIDs might point to new insights on protective mechanisms against COVID-19.
IMMs were not significantly associated with worse outcomes.Certain classes of IMMs showed some predictive value; however, due to an absence of significance after correcting for a false discovery rate and inconsistent results across analytical methods and time periods, these observations need further investigation.Furthermore, some IMMs might have clinically significant benefits or harms for a subset of patients with IMIDs.In general, care should be taken when interpreting the results of the study.Given unmeasured potential confounders and unmatched controls, risk factors should not necessarily be deemed as causal.However, the results from these more comprehensive multivariate models can help to inform clinical, policy, and research decisions for patients with IMIDs and COVID-19.Overall, there is a need to take age and comorbidities into consideration when developing COVID-19 guidelines for patients with IMIDs.Further research is needed for specific IMIDs (including IMID severity at the time of SARS-CoV-2 infection) and IMMs (considering dosage and timing before a patient's first COVID-19 infection).

Evidence before this study
We aimed to understand severe COVID-19 outcomes and to investigate the effects of the pandemic time period and the risks associated with individual immune-mediated inflammatory diseases (IMIDs), classes of immunomodulatory medications (IMMs), chronic comorbidities, and COVID-19 vaccination status.We searched PubMed, medRxiv, bioRxiv, and Google Scholar for large-population, multivariable studies published in English from Jan 1, 2020, to April 24, 2023, using the following search terms: "COVID-19" with "immune-mediated inflammatory disease", "autoimmune disease", "immunomodulatory medication", "immunosuppressive medication", and "rheumatic disease", as well as "infection", "hospitalisation", "mechanical ventilation", and "mortality" risk.We also searched for rates related to COVID-19 in patients receiving IMMs.To our knowledge, as of April 24, 2023, no study has investigated the risk of severe COVID-19 outcomes accounting for the interconnected factors of specific IMIDs, classes of IMMs, chronic comorbidities, and COVID-19 vaccination status, with consideration of SARS-CoV-2 variants dominant in the early pandemic period and more recent omicron variants.

Added value of this study
We developed high-performance machine learning models on data from electronic health records for over 2 million patients who were tested for COVID-19 across seven states in the USA at two different timeframes across the pandemic: the pre-omicron period (March 1, 2020-Dec 25, 2021) and the omicron-predominant period (Dec 26, 2021-Aug 30, 2022).In both timeframes, patients with IMIDs had decreased rates of COVID-19; however, individuals with both an IMID and COVID-19 had an increased rate of hospitalisation and mortality.Age and chronic comorbidities were associated with worse outcomes, whereas vaccinations and boosters were associated with improved outcomes in all patients with COVID-19.Selected IMIDs showed an increased risk of severe COVID-19 outcomes; however, asthma, psoriasis, and spondyloarthritis were associated with better outcomes than were expected for the overall population.Most classes of IMMs were not associated with an increased risk of severe COVID-19 outcomes, but some IMMs were limited by sample size and require further study.

Implications of all the available evidence
Although patients with IMIDs are at an increased risk of severe COVID-19 outcomes, this research suggests that age, comorbidities, and not being fully vaccinated are greater risk factors than the IMID diagnoses themselves or the use of IMMs.The finding that asthma, psoriasis, and spondyloarthritis were associated with better outcomes than those expected for the overall population suggests that some IMIDs might provide new insight into protective mechanisms against COVID-19.Overall, there is a need to take age and comorbidities into consideration when developing COVID-19 guidelines for patients with IMIDs.In addition, further research is needed for each specific IMID (with inclusion of IMID severity at the time of COVID-19 infection) and each IMM (with consideration of pre-COVID-19 dosage and timing).Nominal classes are binary (0 or 1).For sex, male is 1 (red).COPD=chronic obstructive pulmonary disorder.SHAP=Shapley Additive Explanations.Severe COVID-19 outcomes in patients with and without IMIDs during the pre-omicron and omicron-predominant periods

Figure 2 :
Figure 2: Cohort flow diagram over the pre-omicron and omicron-predominant periods NAAT=nucleic acid amplification test.PSJH=Providence St Joseph Health.*Total patient number including patients without previous history at PSJH.

Figure 3 :
Figure 3: Selected factors for hospitalisation, mechanical ventilation, and death in patients with COVID-19 between pre-omicron and omicron-predominant periods The pre-omicron period was between March 1, 2020, and Dec 25, 2021; the omicronpredominant period was between Dec 26, 2021, and Aug 30, 2022.The colour of each circle represents its corresponding p value, calculated with raw data.The position and size of each circle represents log-adjusted ORs and feature importance from over-sampling.Logadjusted ORs were calculated with multivariable logistic regression.Error bars within circles represent 95% CIs.Factors with fewer than ten observations were excluded.COPD=chronic obstructive pulmonary disorder.IMID=immune-mediated inflammatory disease.

Figure 4 :
Figure 4: SHAP summary plot for top 30 features of all-age model of hospitalisation, mechanical ventilation, and death among patients with COVID-19 Feature importance provided for the pre-omicron period between March 1, 2020 and Dec 25, 2021 (A) and the omicron-predominant period between Dec 26, 2021 and Aug 30, 2022 (B).Gradient boosting decision tree feature importance and influence of higher and lower values of the risk factors on the all-age group population outcome.SHAP values of less than 0 are associated with a reduced risk of hospitalisation, mechanical ventilation, or death; SHAP values of more than 0 are associated with an increased risk.Red dots represent patients with higher values for a variable; blue dots represent patients with lower values.Nominal classes are binary (0 or 1).For sex, male is 1 (red).COPD=chronic obstructive pulmonary disorder.SHAP=Shapley Additive Explanations.

Figure 5 :
Figure 5: SHAP summary plot for top 30 features of all-age model of death among patients with COVID-19Feature importance provided for the pre-omicron period between March 1, 2020, and Dec 25, 2021 (A) and the omicron-predominant period between Dec 26, 2021 and Aug 8, 2022 (B).Gradient boosting decision tree feature importance and influence of higher and lower values of the risk factors on the all-age group population outcome.SHAP values of less than 0 are associated with a reduced risk of hospitalisation, mechanical ventilation, or death; SHAP values of more than 0 are associated with an increased risk.Red dots represent patients with higher values for a variable; blue dots represent patients with lower values.Nominal classes are binary (0 or 1).For sex, male is 1 (red).COPD=chronic obstructive pulmonary disorder.SHAP=Shapley Additive Explanations.